$('#password').focusin(function(){
    // 密码框选中
    $('.login-box').addClass('up');
}).focusout(function(){
    // 密码框非选中
    $('.login-box').removeClass('up');
})
// 眼球移动
/*$(document).on('keydown', '#username', function() {
    let username = $(this).val();
    let dw = $(document).width() / 10000;
    let dh = $(document).height() / 1800;
    console.log(username.length);
    let x = username.length * dw;
    let y = username.length * dh;
    if (username.length > 3) {
        $('.eye-ball').css({
            'background-color': '#452220'
        });
    }
    if (username.length > 5) {
        $('.eye-ball').css({
            'background-color': '#9e4641'
        });
    }
    if (username.length > 8) {
        $('.eye-ball').css({
            'background-color': '#FF0000'
        });
    }
    if (username.length < 3) {
        $('.eye-ball').css({
            'background-color': '#000000'
        });
    }

    $('.eye-ball').css({
        transform: `translate(${x}px, ${y}px)`
    });
});*/
$(document).on('mousemove',function(e){
    let dw=$(document).width() / 10;
    let dh=$(document).height() / 18;
    let x=e.pageX / dw;
    let y=e.pageY / dh;
    $('.eye-ball').css({
        left:x,
        top:y
    })
})
